home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
- *
- * IOFrameBufferDisplay.h - Standard frame buffer display driver class.
- *
- *
- * HISTORY
- * 01 Sep 92 Joe Pasqua
- * Created.
- */
-
- /* Notes:
- * This module defines an abstract superclass for "standard" (linear)
- * framebuffers.
- */
-
- #ifndef __IOFRAMEBUFFERDISPLAY_H__
- #define __IOFRAMEBUFFERDISPLAY_H__
-
- #import <driverkit/IODisplay.h>
-
- @interface IOFrameBufferDisplay:IODisplay
- {
- @private
- void *priv;
- /* Mapping tables used in cursor drawing to 5-5-5 displays. */
- unsigned char *_bm34To35SampleTable;
- unsigned char *_bm35To34SampleTable;
-
- /* Mapping tables used in cursor drawing to 8-bit RGB displays. */
- unsigned int *_bm256To38SampleTable;
- unsigned char *_bm38To256SampleTable;
-
- /* Reserved for future expansion. */
- int _IOFrameBufferDisplay_reserved[6];
- }
-
- /* Put the display into linear framebuffer mode. This typically happens
- * when the window server starts running. This method is implemented by
- * subclasses in a device specific way.
- */
- - (void)enterLinearMode;
-
- /* Get the device out of whatever advanced linear mode it was using and back
- * into a state where it can be used as a standard VGA device. This method
- * is implemented by subclasses in a device specific way.
- */
- - (void)revertToVGAMode;
-
- /* Look up the physical memory location for this device instance and map
- * it into VM for use by the device driver. If problems occur, the method
- * returns (vm_address_t)0. If `addr' is not 0, then it is used as the
- * physical memory address and `length' is used as the length.
- */
- - (vm_address_t)mapFrameBufferAtPhysicalAddress:(unsigned int)addr
- length:(int)length;
-
- /* Choose a mode from the list `modeList' (containing `count' modes) based
- * on the value of the `DisplayMode' key in the device's config table. If
- * `isValid' is nonzero, each element specifies whether or not the
- * corresponding mode is valid.
- */
- - (int)selectMode:(const IODisplayInfo *)modeList count:(int)count
- valid:(const BOOL *)isValid;
-
- /* Equivalent to the above with `isValid' set to zero.
- */
- - (int)selectMode:(const IODisplayInfo *)modeList count:(int)count;
-
- /* IODevice methods reimplemented by this class. */
-
- + (BOOL)probe:deviceDescription;
-
- - initFromDeviceDescription:deviceDescription;
-
- - (IOReturn)getIntValues : (unsigned *)parameterArray
- forParameter : (IOParameterName)parameterName
- count : (unsigned *)count; // in/out
-
- - (IOReturn)setIntValues : (unsigned *)parameterArray
- forParameter : (IOParameterName)parameterName
- count : (unsigned)count;
-
- - (IOReturn)setCharValues : (unsigned char *)parameterArray
- forParameter : (IOParameterName)parameterName
- count : (unsigned)count;
-
- - setTransferTable:(const unsigned int *)table count:(int)count;
-
- /* 'IOScreenEvents' protocol methods reimplemented by this class. */
-
- - hideCursor: (int)token;
-
- - moveCursor:(Point*)cursorLoc frame:(int)frame token:(int)t;
-
- - showCursor:(Point*)cursorLoc frame:(int)frame token:(int)t;
-
- /* NOTE: Subclasses must override setBrightness and implement appropriately. */
- - setBrightness:(int)level token:(int)t;
-
- @end
-
- #endif /* __IOFRAMEBUFFERDISPLAY_H__ */
-